Periodic synchronization
code:js
navigator.serviceWorker.ready.then(function(registration) {
registration.periodicSync.register({
tag: 'get-latest-news', // default: ''
minPeriod: 12 * 60 * 60 * 1000, // default: 0
powerState: 'avoid-draining', // default: 'auto'
networkState: 'avoid-cellular' // default: 'online'
}).then(function(periodicSyncReg) {
// success
}, function() {
// failure
})
});
まだ periodicSync 存在しない? 2019/4/4
Chrome 73.0.3683.86
https://gyazo.com/0ffea35c1309d80690ec607a2b801fa2
Design Docsをtwitterで見かけた 2019/4